package com.itheima.mapper;

import com.itheima.pojo.OrderSetting;

import org.apache.ibatis.annotations.Param;

import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @description: 预约管理持久层
 * @author: wangjingliang
 * @create: 2019-11-16 17:28
 **/
public interface OrderSettingMapper {
    /**
     * 添加
     *
     * @param: a
     * @return: null
     * @date: 2019/11/16
     */
    public int add(OrderSetting orderSetting);

    /**
     * 修改
     *
     * @param: a
     * @return: null
     * @date: 2019/11/16
     */
    public int edit(OrderSetting orderSetting);

    /**
     * 查询
     *
     * @param: a
     * @return: null
     * @date: 2019/11/16
     */
    public int findCountOrderSetting(OrderSetting orderSetting);


    /**
     * 根据年月查询信息02
     *
     * @param:
     * @return: null
     * @date: 2019/11/17
     */
    public List<Map<String, Object>> findByorderDate(@Param("date") String date);

    /**
     * 根据日期对预约人数进行修改
     *
     * @param:
     * @return: null
     * @date: 2019/11/17
     */
    public int editNumberByDate(OrderSetting orderSetting);

    /**
     * 根据日期对预约数据进行查询
     *
     * @param:
     * @return: null
     * @date: 2019/11/17
     */
    public OrderSetting findAllByDate(@Param("orderDate") Date orderDate);

    /**
     * 根据日期对预约人数进行导入
     *
     * @param:
     * @return: null
     * @date: 2019/11/17
     */
    public void insertNumberByDate(OrderSetting orderSetting);

    /**
     * 根据日期对预约人数进行查询
     *
     * @param:
     * @return: null
     * @date: 2019/11/17
     */
    Integer findCountNumberByDate(OrderSetting orderSetting);

    /**
     * 根据日期修改预约人数
      @param: a
     * @return: null
     * @date: 2019/11/20
     */
    void editReservationsByOrderDateAndReservations(@Param("orderDate") Date orderDate, @Param("reservations") Integer reservations);
}
